home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 20 / Cream of the Crop 20 (Terry Blount) (1996).iso / os2 / cpumt10b.zip / cpumeter.HLP (.txt) < prev    next >
OS/2 Help File  |  1996-07-20  |  28KB  |  393 lines

  1.  
  2. ΓòÉΓòÉΓòÉ 1. About CPUMeter ΓòÉΓòÉΓòÉ
  3.  
  4. Welcome to CPUMeter Version 1.0b 
  5.  
  6. I am proud to present the first public version of CPUMeter. This program is 
  7. SHAREWARE. You are allowed to distribute zip file cpum*.zip. Do NOT 
  8. redistribute any part of this zip file. After a trial period of two weeks, you 
  9. must register if you want to use the program further. Otherwise, you must 
  10. remove it from your computer. 
  11.  
  12. CPUMeter is an enhanced CPU use monitor, similar to "PULSE.EXE". Unlike other 
  13. CPU monitors, it does not use a counting loop to determine the CPU load. 
  14. Instead, it uses the DosQProcStat API call. This reduces CPU load and power 
  15. consumption and makes it possible to show information about processes that hog 
  16. the CPU. 
  17.  
  18. This program is SHAREWARE. That means you are allowed to copy and distribute 
  19. the original archive (cpum*.zip) and you are allowed to test the program for 
  20. four weeks. After that time, you MUST register it or remove the program from 
  21. your PC(s). 
  22.  
  23. To register, send me 
  24.  
  25.      Money $$$$  ;-) 
  26.  
  27.         -  either DM 20 in cash or a negotiable EUROCHECK 
  28.  
  29.         -  or   US$20 in cash or a negotiable EUROCHECK 
  30.  
  31.      Your postal or e-mail address, so I will know where to send your 
  32.       registration key. 
  33.  
  34.  My address is: 
  35.  
  36.     Christof Pastors 
  37.     Luitpoldstr. 12 
  38.     91054 Erlangen 
  39.  
  40.     Germany 
  41.  
  42.  I am also open to receiving comments and suggestions about my program and 
  43.  appreciate receiving constructive comments. You can contact me via e-mail at: 
  44.     pastors@eev.e-technik.uni-erlangen.de 
  45.  
  46.  New versions of CPUMeter can be found on the regular ShareWare servers (like 
  47.  Hobbes) or (the very newest) at: 
  48.     http://eev11.e-technik.uni-erlangen.de/cpumeter.html 
  49.  
  50.  And here is the legal stuff: 
  51.  
  52.  CPUMeter is Copyright (c) 1996 Christof Pastors 
  53.  
  54.  This program is provided "as-is" in a form that gives you a chance to try it 
  55.  for four weeks. After that time, you MUST either register it or remove the 
  56.  program from your PC(s). I will NOT SUPPORT unregistered users (though I will 
  57.  listen to their comments and constructive criticism). I have tried to find as 
  58.  many bugs as possible, but am IN NO WAY RESPONSIBLE FOR INDIRECT OR SIMILAR 
  59.  DAMAGES, INCLUDING ANY LOST PROFITS OR LOST DATA ARISING FROM THE USE OR 
  60.  INABILITY TO USE THE SOFTWARE OR ANY DATA SUPPLIED. 
  61.  
  62.  
  63. ΓòÉΓòÉΓòÉ 2. Installation ΓòÉΓòÉΓòÉ
  64.  
  65. Simply unzip the zipped files into a single directory. Then, create a program 
  66. object either by starting cpu_inst.cmd or by dragging the Program template from 
  67. the Templates folder and customizing the resulting object. 
  68.  
  69. CPUMeter neither registers a DLL nor creates entries in the OS/2 INI files. (I 
  70. don't like programs that modify system files!) 
  71.  
  72. NEW! Accurate results with High-Resolution Timer! 
  73. To exploit the full capabilities of CPUMeter, you can use the High-Resolution 
  74. Timer. For this, you need two new drivers from IBM: CLOCK01.SYS and TIMER0.SYS. 
  75. If you have one of those rare micro-channel PCs, you need the CLOCK02.SYS 
  76. driver instead of CLOCK01.SYS. These drivers prevent CPUMeter from showing too 
  77. much CPU load for an application that awakens very frequently (for example, to 
  78. handle mouse motion messages). BUT BE WARNED... 
  79. Enabling this option can cause problems: 
  80.  
  81.      DOS programs that use the high-resolution timer will hang. This will 
  82.       probably affect many DOS Games. 
  83.  
  84.      WINDOWS sessions may hang when starting or may respond slowly to mouse 
  85.       input. 
  86.  
  87.      Seamless WINOS2 sessions may hang on startup and block the OS/2 Desktop. 
  88.  If you have problems with a DOS program using the high-resolution timer, go to 
  89.  the Settings Notebook for CPUMeter and disable the use of the timer. In some 
  90.  cases, you may have to exit CPUMeter to free the timer. 
  91.  
  92.  How YOU can get these drivers: 
  93.  
  94.      They will be part of Merlin, the next version of OS/2. 
  95.  
  96.      I added the MMPM_MPU.ZIP archive that comes from IBM to the CPUMeter 
  97.       archive. You can find the needed drivers there. 
  98.  
  99.      They are part of the DEVCON 9/10 Developer's Toolkit for OS/2 Warp (see 
  100.       the BETA section). 
  101.  
  102.      They are part of the new Real-Time MIDI package developed by IBM. 
  103.  
  104.      And they are available for FTP from the HOBBES Shareware archive (file 
  105.       MMPM_MPU.ZIP). 
  106.  
  107.  How to install the new drivers: 
  108.  If you don't use (or need) the associated Multimedia Setup "MINSTALL.EXE", 
  109.  which installs full MPU-401 multimedia support, install the drivers by hand as 
  110.  follows: 
  111.  
  112.      Make a backup copy of the clock01.sys that resides  in the \os2\boot\ 
  113.       directory. 
  114.  
  115.      Copy the new clock01.sys and timer0.sys to this directory. 
  116.  
  117.      Add the statement BASEDEV=TIMER0.SYS to your config.sys. 
  118.  
  119.      Reboot. 
  120.  If CPUMeter can't access the high-resolution timer on program startup, it will 
  121.  use the (less accurate) standard timer. 
  122.  
  123.  
  124. ΓòÉΓòÉΓòÉ 3. Technical Details ΓòÉΓòÉΓòÉ
  125.  
  126. How does it work? What's so special about this "Pulse"-like application? 
  127.  
  128. I never liked the way most monitors of this type work: They create an 
  129. idle-priority thread that executes a never-ending counting loop, that hogs the 
  130. CPU as soon as it is otherwise idle. This way the CPU will never really be 
  131. idle.... 
  132.  
  133. Instead I wrote a REAL CPU monitor, that queries the OS/2 kernel every second 
  134. to determine how much CPU time each process has consumed and then displays the 
  135. results. After about 10 milliseconds, this function is complete and the CPU is 
  136. idle again. There is a "documented" undocumented API call (DosQueryProcStat) 
  137. that gives all the information required, including how much CPU time each 
  138. thread of each process has consumed. If you are curious, take a look at 
  139. pstat.exe in your \os2\ directory. Simply put, this program formats the output 
  140. of the aforementioned API call. It and the wonderful tool called watchcat 
  141. exploit this API call and gave me the idea ... 
  142.  
  143. Basically, CPUMeter queries the process statistics every second and sums up the 
  144. CPU time consumed by all threads. This and the name of the process that 
  145. consumed the most CPU are displayed. There are some advantages and some 
  146. disadvantages to this approach: 
  147.  
  148. Advantages: 
  149.  
  150.      It is easy to identify which process is actually hogging the CPU. 
  151.  
  152.      There is no idle thread continually counting. This means: 
  153.  
  154.         -  The CPU is really idle when it has nothing else to do. The power 
  155.            consumption of the CPU is reduced dramatically. As my favorite 
  156.            German computer magazine Ct showed, OS/2 and LINUX halt the CPU when 
  157.            the kernel is idle between (timer) interrupts and has nothing to do. 
  158.            On my P60, the power consumed by the CPU goes down from 12W to 4W. 
  159.            This could be interesting for people who like overclocking their 
  160.            CPUs ;-), or for those who own a NOTEBOOK and wonder why the battery 
  161.            goes low when PULSE is running... 
  162.  
  163.         -  Other idle-priority threads like the thumbnail creator in PMVIEW.EXE 
  164.            or the idle-priority worker thread in FM/2 can do their work without 
  165.            having to share the CPU with PULSE and its counting loop. 
  166.  
  167.  Disadvantages: 
  168.  
  169.      When threads are created and destroyed very quickly (< 1 second), 
  170.       CPUMeter will not always see them and therefore may report a lower than 
  171.       actual CPU load. 
  172.  
  173.       Note: 
  174.       The next problem is fixed if you have the new High-Resolution Timer from 
  175.       IBM installed! See installation for details. 
  176.  
  177.      When a process awakens very often (a hundred or more times per second), 
  178.       the kernel charges it with too much CPU time. This can occur for a DOS 
  179.       Window that polls the keyboard or for a window that receives a lot of 
  180.       messages when you move the mouse over it. I'm sorry. This is a 
  181.       restriction of the kernel and is not my fault. 
  182.  
  183.  
  184. ΓòÉΓòÉΓòÉ 4. CPUMeter Application Help ΓòÉΓòÉΓòÉ
  185.  
  186. CPUMeter's User Interface consists of: 
  187.  
  188.  Main Window         this is shown on startup. 
  189.  
  190.  PopUp menu          this is shown after a Right Mouse Butto